Optimal. Leaf size=212 \[ \frac {a \left (a^2+6 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}+\frac {b \left (6 a^2+5 b^2\right ) \cot (c+d x)}{15 d}+\frac {a \left (a^2+6 b^2\right ) \cot (c+d x) \csc (c+d x)}{16 d}+\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.39, antiderivative size = 212, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 10, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.345, Rules used = {2968, 3127,
3126, 3110, 3100, 2827, 3853, 3855, 3852, 8} \begin {gather*} \frac {b \left (6 a^2+5 b^2\right ) \cot (c+d x)}{15 d}+\frac {a \left (a^2+6 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}+\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (a^2+6 b^2\right ) \cot (c+d x) \csc (c+d x)}{16 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2827
Rule 2968
Rule 3100
Rule 3110
Rule 3126
Rule 3127
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \cot ^2(c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3 \, dx &=\int \csc ^7(c+d x) (a+b \sin (c+d x))^3 \left (1-\sin ^2(c+d x)\right ) \, dx\\ &=-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}+\frac {1}{6} \int \csc ^6(c+d x) (a+b \sin (c+d x))^2 \left (3 b-a \sin (c+d x)-4 b \sin ^2(c+d x)\right ) \, dx\\ &=-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}+\frac {1}{30} \int \csc ^5(c+d x) (a+b \sin (c+d x)) \left (-5 a^2+6 b^2-13 a b \sin (c+d x)-14 b^2 \sin ^2(c+d x)\right ) \, dx\\ &=\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {1}{120} \int \csc ^4(c+d x) \left (24 b \left (3 a^2-b^2\right )+15 a \left (a^2+6 b^2\right ) \sin (c+d x)+56 b^3 \sin ^2(c+d x)\right ) \, dx\\ &=\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {1}{360} \int \csc ^3(c+d x) \left (45 a \left (a^2+6 b^2\right )+24 b \left (6 a^2+5 b^2\right ) \sin (c+d x)\right ) \, dx\\ &=\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {1}{15} \left (b \left (6 a^2+5 b^2\right )\right ) \int \csc ^2(c+d x) \, dx-\frac {1}{8} \left (a \left (a^2+6 b^2\right )\right ) \int \csc ^3(c+d x) \, dx\\ &=\frac {a \left (a^2+6 b^2\right ) \cot (c+d x) \csc (c+d x)}{16 d}+\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}-\frac {1}{16} \left (a \left (a^2+6 b^2\right )\right ) \int \csc (c+d x) \, dx+\frac {\left (b \left (6 a^2+5 b^2\right )\right ) \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{15 d}\\ &=\frac {a \left (a^2+6 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}+\frac {b \left (6 a^2+5 b^2\right ) \cot (c+d x)}{15 d}+\frac {a \left (a^2+6 b^2\right ) \cot (c+d x) \csc (c+d x)}{16 d}+\frac {b \left (3 a^2-b^2\right ) \cot (c+d x) \csc ^2(c+d x)}{15 d}+\frac {a \left (5 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x)}{120 d}-\frac {b \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^2}{10 d}-\frac {\cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^3}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.49, size = 369, normalized size = 1.74 \begin {gather*} -\frac {-64 \left (6 a^2 b+5 b^3\right ) \cot \left (\frac {1}{2} (c+d x)\right )-30 \left (a^3+6 a b^2\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )-120 a^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-720 a b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+120 a^3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+720 a b^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+30 a^3 \sec ^2\left (\frac {1}{2} (c+d x)\right )+180 a b^2 \sec ^2\left (\frac {1}{2} (c+d x)\right )-90 a b^2 \sec ^4\left (\frac {1}{2} (c+d x)\right )-5 a^3 \sec ^6\left (\frac {1}{2} (c+d x)\right )+96 a^2 b \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )-640 b^3 \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )+a^2 \csc ^6\left (\frac {1}{2} (c+d x)\right ) (5 a+18 b \sin (c+d x))+2 b \csc ^4\left (\frac {1}{2} (c+d x)\right ) \left (45 a b+\left (-3 a^2+20 b^2\right ) \sin (c+d x)\right )+384 a^2 b \tan \left (\frac {1}{2} (c+d x)\right )+320 b^3 \tan \left (\frac {1}{2} (c+d x)\right )-36 a^2 b \sec ^4\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{1920 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 224, normalized size = 1.06
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-\frac {\cos ^{3}\left (d x +c \right )}{6 \sin \left (d x +c \right )^{6}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{16 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{16}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )+3 a^{2} b \left (-\frac {\cos ^{3}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15 \sin \left (d x +c \right )^{3}}\right )+3 a \,b^{2} \left (-\frac {\cos ^{3}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )-\frac {b^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )^{3}}}{d}\) | \(224\) |
default | \(\frac {a^{3} \left (-\frac {\cos ^{3}\left (d x +c \right )}{6 \sin \left (d x +c \right )^{6}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{16 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{16}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )+3 a^{2} b \left (-\frac {\cos ^{3}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15 \sin \left (d x +c \right )^{3}}\right )+3 a \,b^{2} \left (-\frac {\cos ^{3}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}-\frac {\cos ^{3}\left (d x +c \right )}{8 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )}{8}-\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )-\frac {b^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )^{3}}}{d}\) | \(224\) |
risch | \(-\frac {480 i b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+15 a^{3} {\mathrm e}^{11 i \left (d x +c \right )}+90 a \,b^{2} {\mathrm e}^{11 i \left (d x +c \right )}+720 i b^{3} {\mathrm e}^{8 i \left (d x +c \right )}-240 i b^{3} {\mathrm e}^{10 i \left (d x +c \right )}-85 a^{3} {\mathrm e}^{9 i \left (d x +c \right )}+450 a \,b^{2} {\mathrm e}^{9 i \left (d x +c \right )}-800 i b^{3} {\mathrm e}^{6 i \left (d x +c \right )}-240 i b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-570 a^{3} {\mathrm e}^{7 i \left (d x +c \right )}-540 a \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-576 i a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-570 a^{3} {\mathrm e}^{5 i \left (d x +c \right )}-540 a \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+96 i a^{2} b +1440 i a^{2} b \,{\mathrm e}^{8 i \left (d x +c \right )}-85 \,{\mathrm e}^{3 i \left (d x +c \right )} a^{3}+450 a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-960 i a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+80 i b^{3}+15 a^{3} {\mathrm e}^{i \left (d x +c \right )}+90 a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{6}}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{16 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b^{2}}{8 d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{16 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b^{2}}{8 d}\) | \(413\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 202, normalized size = 0.95 \begin {gather*} -\frac {5 \, a^{3} {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{5} - 8 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + 90 \, a b^{2} {\left (\frac {2 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {160 \, b^{3}}{\tan \left (d x + c\right )^{3}} + \frac {96 \, {\left (5 \, \tan \left (d x + c\right )^{2} + 3\right )} a^{2} b}{\tan \left (d x + c\right )^{5}}}{480 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 310, normalized size = 1.46 \begin {gather*} \frac {80 \, a^{3} \cos \left (d x + c\right )^{3} - 30 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} + 30 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right ) + 15 \, {\left ({\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 6 \, a b^{2} + 3 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 15 \, {\left ({\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{4} - a^{3} - 6 \, a b^{2} + 3 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 32 \, {\left ({\left (6 \, a^{2} b + 5 \, b^{3}\right )} \cos \left (d x + c\right )^{5} - 5 \, {\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{480 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 354, normalized size = 1.67 \begin {gather*} \frac {5 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 36 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 90 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 60 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 80 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 240 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 120 \, {\left (a^{3} + 6 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {294 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 1764 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 240 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 60 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 80 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 90 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 36 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5 \, a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6}}}{1920 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.69, size = 292, normalized size = 1.38 \begin {gather*} \frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}-\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{128\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a^3}{2}+3\,a\,b^2\right )-\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (2\,a^2\,b+\frac {8\,b^3}{3}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (12\,a^2\,b+8\,b^3\right )+\frac {a^3}{6}+\frac {6\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}\right )}{64\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {a^3}{128}+\frac {3\,a\,b^2}{64}\right )}{d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {a^2\,b}{32}+\frac {b^3}{24}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (\frac {a^3}{16}+\frac {3\,a\,b^2}{8}\right )}{d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,a^2\,b}{16}+\frac {b^3}{8}\right )}{d}+\frac {3\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________